<!DOCTYPE html>
<html class="x-admin-sm">


<head>
    <meta charset="UTF-8">
    <title></title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="stylesheet" href="./css/font.css">
    <link rel="stylesheet" href="./css/xadmin.css">
    <link rel="stylesheet" href="./css/advpos.css">
    <script src='./node_modules/layui/dist/layui.js'></script>
    <script type="text/javascript" src="./js/xadmin.js"></script>
    <!--[if lt IE 9]>
          <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
          <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
        <![endif]-->
</head>

<body>
    <div class="layui-card">
        <!-- 筛选区域 -->
        <form class="layui-form layui-inline" id="form-search">
            <div class="layui-fluid">
                <div class="layui-row link_nav">
                    <ul class="link_list_add">
                        <li class="add_link link_list"> <a href="javascript:;" id="one">广告位列表</a></li>
                        <li class="add_link"> <a href="javascript:;" id="char">添加广告位</a></li>
                    </ul>
                </div>
            </div>
        </form>


        <!-- 卡片 -->
        <div class="layui-card-body" id="gsgs">
            <!-- 列表区域 -->
            <table class="layui-table" lay-skin="nob">
                <colgroup>
                    <col width="80">
                    <col width="80">
                    <col>
                    <col width="150">
                    <col>
                    <col>
                    <col>
                </colgroup>
                <thead>
                    <tr>
                        <th>序号</th>
                        <th>文章ID</th>
                        <th>广告位名称</th>
                        <th>广告位描述</th>
                        <th>广告位尺寸</th>
                        <th>广告数量</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                </tbody>
            </table>
            <div id="pageBox"></div>
        </div>



        <!-- 分页 -->

        <!-- 分页区域 -->
        <div id="gsywly" style="display:none">
            <form class="layui-form box1" action="" id="form-add">
                <div class="layui-form-item">
                    <label class="layui-form-label">广告位名称</label>
                    <div class="layui-input-block ">
                        <input type="text" name="advposname" required lay-verify="required" placeholder="请输入名称" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">广告位描述</label>
                    <div class="layui-input-block">
                        <input type="text" name="advposdesc" required lay-verify="required" placeholder="请输入描述" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">广告位尺寸</label>
                    <div class="layui-input-block">
                        <input type="text" name="advpossize" required lay-verify="required|pwd" placeholder="宽度,高度。如:200,300注意英文逗号间隔" autocomplete="off" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button class="layui-btn" lay-submit lay-filter="formDemo">立即创建</button>
                        <button type="reset" class="layui-btn layui-btn-primary">取消</button>
                    </div>
                </div>
            </form>
        </div>

    </div>


    <!-- 列表的模板引擎 -->
    <script type="text/html" id="tpl-table">
        {{each data}}
        <tr>
            <td>{{++$index}}</td>
            <td>{{$value.id}}</td>
            <td>{{$value.advposname}}</td>
            <td>{{$value.advposdesc}}</td>
            <td>{{$value.advpossize}}</td>
            <td>{{$value.advposnum}}</td>
            <td>
                <button type="button" class="layui-btn layui-btn layui-btn-xs "><a href="advimg.html"style="color: aliceblue">查看</a></button>
                <button type="button" class="layui-btn layui-btn layui-btn-xs btn-edit" id="btnAddCate" data-id="{{$value.id}}" data-advposname="{{$value.advposname}}" data-advposdesc="{{$value.advposdesc}}" data-advpossize="{{$value.advpossize}}">编辑</button>
                <button type="button" class="layui-btn layui-btn layui-btn-xs btn-deletes" data-id="{{$value.id}}">删除</button>
            </td>
        </tr>
        {{/each}}
    </script>

    <!-- 分类可选项的模板引擎 -->
    <script type="text/html" id="tpl-cate">
        <form class="layui-form box1" lay-filter="form-addc" id="form-addc">
            <!-- 隐藏域,保存id的值 -->
            <input type="hidden" name="id" value="">
            <input type="hidden" name="act" value="edit">
            <div class="layui-form-item">
                <label class="layui-form-label">广告位名称</label>
                <div class="layui-input-block ">
                    <input type="text" name="advposname" required lay-verify="required" placeholder="请输入名称" autocomplete="off" class="layui-input" style="width:85% !important">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">广告位描述</label>
                <div class="layui-input-block">
                    <input type="text" name="advposdesc" required lay-verify="required" placeholder="请输入描述" autocomplete="off" class="layui-input" style="width:85% !important">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">广告位尺寸</label>
                <div class="layui-input-block">
                    <input type="text" name="advpossize" required lay-verify="required|pwd" placeholder="宽度,高度。如:200,300注意英文逗号间隔" autocomplete="off" class="layui-input" style="width:85% !important">
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit lay-filter="formDemo">确定</button>
                    <button type="reset" class="layui-btn layui-btn-primary">取消</button>
                </div>
            </div>
        </form>
    </script>



    <script src='./js/jquery.min.js'></script>
    <script src='./js/template-web.js'></script>
    <script src="./js/advpos.js"></script>

</body>
<script>
</script>

</html>